<!DOCTYPE html>
<html><head>
        <meta charset="utf-8">
    <title>学无止境，耐得住寂寞的人最坚强！</title>

    <meta name="description" content="Dashboard">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--Basic Styles-->
    <link href="__ADMIN__/style/bootstrap.css" rel="stylesheet">
    <link href="__ADMIN__/style/font-awesome.css" rel="stylesheet">
    <link href="__ADMIN__/style/weather-icons.css" rel="stylesheet">

    <!--Beyond styles-->
    <link id="beyond-link" href="__ADMIN__/style/beyond.css" rel="stylesheet" type="text/css">
    <link href="__ADMIN__/style/demo.css" rel="stylesheet">
    <link href="__ADMIN__/style/typicons.css" rel="stylesheet">
    <link href="__ADMIN__/style/animate.css" rel="stylesheet">
 
</head>
<body>
{include file="public/header"}
	<!-- /头部 -->
	
	<div class="main-container container-fluid">
		<div class="page-container">
			            <!-- Page Sidebar -->
            {include file="public/left"}
            <!-- /Page Sidebar -->
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                                        <li>
                        <a href="#">系统设置</a>
                    </li>
                              
                <li class="active">添加配置</li>
                </ul>
                </div>
                <!-- /Page Breadcrumb -->

                <!-- Page Body -->
                <div class="page-body">
                    
<div class="row">
    <div class="col-lg-12 col-sm-12 col-xs-12">
    <form class="form-horizontal" role="form" action="" method="post" enctype="multipart/form-data">
    <div class="widget flat radius-bordered">
        
        <div class="widget-body">
            <div class="widget-main ">
                <div class="tabbable">
                    <ul class="nav nav-tabs tabs-flat" id="myTab11">
                        <li class="active">
                            <a data-toggle="tab" href="#home11">
                                基本信息设置
                            </a>
                        </li>
                        <li >
                            <a data-toggle="tab" href="#profile11">
                                附加设置
                            </a>
                        </li>
                        <li >
                            <a data-toggle="tab" href="#profile12">
                                SEO设置
                            </a>
                        </li>
                    </ul>
                    <div class="tab-content tabs-flat">
                        <!-- 基本信息设置 -->
                        <div id="home11" class="tab-pane active">
                        <?php foreach($confres as $k=>$v):?>
                            <?php if($v['cf_type']==1):?>
                           <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right"><?php echo $v['cnname'];?>  </label>     
                            <div class="col-sm-6">
                                 <?php if($v['dt_type'] ==1):?>   <!-- 单行文本 -->
                                <input class="form-control" value="{$v.value}" placeholder="" name="{$v.enname}" required="" type="text">
                                <?php endif;?>

                                <?php if($v['dt_type'] ==2):
                                    $valuesArr=explode(',',$v['values']);
                                    foreach($valuesArr as $k1=>$v1):
                                    ?>  <!-- 单选按钮 -->
                                <div class="control-group">
                                    <div class="radio" style="float:left;margin-left:15px">
                                        <label>
                                            <input value="<?php echo $v1;?>" {if condition="$v1 eq $v['value']"} checked="checked" {/if} name="{$v.enname}" type="radio" class="colored-blue">
                                            <span class="text"><?php echo $v1;?></span>
                                        </label>
                                    </div>
                                </div>
                                <?php endforeach; endif;?>

                                <?php if($v['dt_type'] ==3):
                                    $valuesArr=explode(',',$v['values']);
                                    $valueArr=explode(',',$v['value']);
                                    foreach($valuesArr as $k2=>$v2):
                                ?>  <!-- 复选框 -->    
                                <div class="checkbox"  style="float:left;padding-left:15px">
                                    <label>
                                        <input name="{$v.enname}[]" value="<?php echo $v2;?>" type="checkbox" class="colored-blue"
                                        <?php if(in_array($v2,$valueArr)){ echo 'checked="checked"';}?>
                                         value="<?php echo $v2;?>" >
                                        <span class="text"><?php echo $v2;?></span>
                                    </label>
                                </div>
                                <?php endforeach; endif;?>

                                <?php if($v['dt_type'] ==4):?>  <!-- 下拉菜单 -->
                                    <select name="{$v.enname}" id="">
                                    <option value="">请选择</option>
                                    <?php $valuesArr=explode(',',$v['values']);
                                        foreach($valuesArr as $k1=>$v1):?>
                                        <option  {if condition="$v1 eq $v['value']"} selected="selected" {/if}
                                          value="<?php echo $v1;?>"><?php echo $v1;?></option>
                                        }
                                    <?php endforeach;?>
                                    </select>
                                <?php endif;?>

                                <?php if($v['dt_type'] ==5):?>  <!-- 文本域 -->
                                    <textarea name="{$v.enname}"  id="" cols="70" rows="2"><?php echo $v['value']?></textarea>
                                <?php endif;?>

                                <?php if($v['dt_type'] ==6):?> <!-- 附件 -->
                                <input   placeholder="" style="float:left;" name="{$v.enname}"  type="file">
                                {if condition="$v['value'] neq ''"}
                                <img src="{$v.value}" alt="" width="60px">
                                {else /}
                                暂无缩略图
                                {/if}
                                <?php endif;?>
                            </div>
                            <p class="help-block col-sm-4 red">* 必填</p>
                            </div>
                        <?php endif;?>
                        <?php endforeach; ?>
                        </div>

                        <!-- 联系方式 -->
                        <div id="profile11" class="tab-pane">
                        <?php foreach($confres as $k=>$v):?>
                            <?php if($v['cf_type'] ==2):?>
                           <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right"><?php echo $v['cnname'];?>  </label>     
                            <div class="col-sm-6">
                                 <?php if($v['dt_type'] ==1):?>   <!-- 单行文本 -->
                                <input class="form-control" value="{$v.value}" placeholder="" name="{$v.enname}" required="" type="text">
                                <?php endif;?>

                                <?php if($v['dt_type'] ==2):
                                    $valuesArr=explode(',',$v['values']);
                                    foreach($valuesArr as $k1=>$v1):
                                    ?>  <!-- 单选按钮 -->
                                <div class="control-group">
                                    <div class="radio" style="float:left;margin-left:15px">
                                        <label>
                                            <input value="<?php echo $v1;?>" {if condition="$v1 eq $v['value']"} checked="checked" {/if} name="{$v.enname}" type="radio" class="colored-blue">
                                            <span class="text"><?php echo $v1;?></span>
                                        </label>
                                    </div>
                                </div>
                                <?php endforeach; endif;?>

                                <?php if($v['dt_type'] ==3):
                                    $valuesArr=explode(',',$v['values']);
                                    $valueArr=explode(',',$v['value']);
                                    foreach($valuesArr as $k2=>$v2):
                                ?>  <!-- 复选框 -->    
                                <div class="checkbox"  style="float:left;padding-left:15px">
                                    <label>
                                        <input name="{$v.enname}[]" value="<?php echo $v2;?>" type="checkbox" class="colored-blue"
                                        <?php if(in_array($v2,$valueArr)){ echo 'checked="checked"';}?>
                                         value="<?php echo $v2;?>" >
                                        <span class="text"><?php echo $v2;?></span>
                                    </label>
                                </div>
                                <?php endforeach; endif;?>

                                <?php if($v['dt_type'] ==4):?>  <!-- 下拉菜单 -->
                                    <select name="{$v.enname}" id="">
                                    <option value="">请选择</option>
                                    <?php $valuesArr=explode(',',$v['values']);
                                        foreach($valuesArr as $k1=>$v1):?>
                                        <option  {if condition="$v1 eq $v['value']"} selected="selected" {/if}
                                          value="<?php echo $v1;?>"><?php echo $v1;?></option>
                                        }
                                    <?php endforeach;?>
                                    </select>
                                <?php endif;?>

                                <?php if($v['dt_type'] ==5):?>  <!-- 文本域 -->
                                    <textarea name="{$v.enname}"  id="" cols="70" rows="2"><?php echo $v['value']?></textarea>
                                <?php endif;?>

                                <?php if($v['dt_type'] ==6):?> <!-- 附件 -->
                                <input   placeholder="" style="float:left;" name="{$v.enname}"  type="file">
                                {if condition="$v['value'] neq ''"}
                                <img src="{$v.value}" alt="" width="60px">
                                {else /}
                                暂无缩略图
                                {/if}
                                <?php endif;?>
                            </div>
                            <p class="help-block col-sm-4 red">* 必填</p>
                            </div>
                        <?php endif;?>
                        <?php endforeach; ?>
                        </div>
                           <!--  SEO设置 -->
                        <div id="profile12" class="tab-pane">
                        <?php foreach($confres as $k=>$v):?>
                            <?php if($v['cf_type'] ==3):?>
                           <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right"><?php echo $v['cnname'];?>  </label>     
                            <div class="col-sm-6">
                                 <?php if($v['dt_type'] ==1):?>   <!-- 单行文本 -->
                                <input class="form-control" value="{$v.value}" placeholder="" name="{$v.enname}" required="" type="text">
                                <?php endif;?>

                                <?php if($v['dt_type'] ==2):
                                    $valuesArr=explode(',',$v['values']);
                                    foreach($valuesArr as $k1=>$v1):
                                    ?>  <!-- 单选按钮 -->
                                <div class="control-group">
                                    <div class="radio" style="float:left;margin-left:15px">
                                        <label>
                                            <input value="<?php echo $v1;?>" {if condition="$v1 eq $v['value']"} checked="checked" {/if} name="{$v.enname}" type="radio" class="colored-blue">
                                            <span class="text"><?php echo $v1;?></span>
                                        </label>
                                    </div>
                                </div>
                                <?php endforeach; endif;?>

                                <?php if($v['dt_type'] ==3):
                                    $valuesArr=explode(',',$v['values']);
                                    $valueArr=explode(',',$v['value']);
                                    foreach($valuesArr as $k2=>$v2):
                                ?>  <!-- 复选框 -->    
                                <div class="checkbox"  style="float:left;padding-left:15px">
                                    <label>
                                        <input name="{$v.enname}[]" value="<?php echo $v2;?>" type="checkbox" class="colored-blue"
                                        <?php if(in_array($v2,$valueArr)){ echo 'checked="checked"';}?>
                                         value="<?php echo $v2;?>" >
                                        <span class="text"><?php echo $v2;?></span>
                                    </label>
                                </div>
                                <?php endforeach; endif;?>

                                <?php if($v['dt_type'] ==4):?>  <!-- 下拉菜单 -->
                                    <select name="{$v.enname}" id="">
                                    <option value="">请选择</option>
                                    <?php $valuesArr=explode(',',$v['values']);
                                        foreach($valuesArr as $k1=>$v1):?>
                                        <option  {if condition="$v1 eq $v['value']"} selected="selected" {/if}
                                          value="<?php echo $v1;?>"><?php echo $v1;?></option>
                                        }
                                    <?php endforeach;?>
                                    </select>
                                <?php endif;?>

                                <?php if($v['dt_type'] ==5):?>  <!-- 文本域 -->
                                    <textarea name="{$v.enname}"  id="" cols="70" rows="2"><?php echo $v['value']?></textarea>
                                <?php endif;?>

                                <?php if($v['dt_type'] ==6):?> <!-- 附件 -->
                                <input   placeholder="" style="float:left;" name="{$v.enname}"  type="file">
                                {if condition="$v['value'] neq ''"}
                                <img src="{$v.value}" alt="" width="60px">
                                {else /}
                                 未上传图片
                                {/if}
                                <?php endif;?>
                            </div>
                            <p class="help-block col-sm-4 red">* 必填</p>
                            </div>
                        <?php endif;?>
                        <?php endforeach; ?>
                        </div>

                    </div>
                </div>
                    <div class="form-group" style="margin-left:10px;">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <button type="submit" class="btn btn-default">保存信息</button>
                                </div>
                    </div>
            </div>
        </div>
            </div>
    </form>
        </div>
    </div>
</div>

                </div>
                <!-- /Page Body -->
            </div>
            <!-- /Page Content -->
		</div>	
	</div>

	    <!--Basic Scripts-->
    <script src="__ADMIN__/style/jquery_002.js"></script>
    <script src="__ADMIN__/style/bootstrap.js"></script>
    <script src="__ADMIN__/style/jquery.js"></script>
    <!--Beyond Scripts-->
    <script src="__ADMIN__/style/beyond.js"></script>
    


</body></html>